package com.dnui.seven2.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * 
 * @TableName article
 */
@Data
public class Article implements Serializable {
    /**
     * 
     */
    @TableId
    private Long articleId;

    /**
     * 
     */
    private String articleUser;

    /**
     * 
     */
    private String articleContent;

    /**
     * 
     */
    private String articleTitle;

    /**
     * 
     */
    private String articleImage;

    /**
     * 
     */
    private String administratorName;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Article other = (Article) that;
        return (this.getArticleId() == null ? other.getArticleId() == null : this.getArticleId().equals(other.getArticleId()))
            && (this.getArticleUser() == null ? other.getArticleUser() == null : this.getArticleUser().equals(other.getArticleUser()))
            && (this.getArticleContent() == null ? other.getArticleContent() == null : this.getArticleContent().equals(other.getArticleContent()))
            && (this.getArticleTitle() == null ? other.getArticleTitle() == null : this.getArticleTitle().equals(other.getArticleTitle()))
            && (this.getArticleImage() == null ? other.getArticleImage() == null : this.getArticleImage().equals(other.getArticleImage()))
            && (this.getAdministratorName() == null ? other.getAdministratorName() == null : this.getAdministratorName().equals(other.getAdministratorName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getArticleId() == null) ? 0 : getArticleId().hashCode());
        result = prime * result + ((getArticleUser() == null) ? 0 : getArticleUser().hashCode());
        result = prime * result + ((getArticleContent() == null) ? 0 : getArticleContent().hashCode());
        result = prime * result + ((getArticleTitle() == null) ? 0 : getArticleTitle().hashCode());
        result = prime * result + ((getArticleImage() == null) ? 0 : getArticleImage().hashCode());
        result = prime * result + ((getAdministratorName() == null) ? 0 : getAdministratorName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", articleId=").append(articleId);
        sb.append(", articleUser=").append(articleUser);
        sb.append(", articleContent=").append(articleContent);
        sb.append(", articleTitle=").append(articleTitle);
        sb.append(", articleImage=").append(articleImage);
        sb.append(", administratorName=").append(administratorName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}